import threading

a=0

def add1():
    for i in range(10000):
        global a
        a+=1
    print(f'add1--{a}')


def add2():
    for i in range(10000):
        global a
        a+=1
    print(f'add2--{a}')


if __name__ == '__main__':
    thread1=threading.Thread(target=add1)
    thread2=threading.Thread(target=add2)
    thread1.start()
    thread1.join()
    thread2.start()
    thread2.join()
    print(a)